<template>
  <div>
    讲师列表
    <div v-for="(teacher, index) in items" :key="index">
      <a href="#">{{ teacher.name }}</a>
    </div>
  </div>
</template>

<script>
import teacher from "../../api/teacher";
export default {
  // data() {
  //   return {
  //     teacherList: [],
  //   };
  // },
  /**
   * 在客户端
   */
  // created() {},
  /**
   * 在服务端执行 >created
   * @param {*} param0
   */
  asyncData() {
    return teacher.getTeacherList().then((res) => {
      return {
        items: res.data.items,
      };
    });
  },
  methods: {},
};
</script>

<style></style>
